import {
	$http
} from '@/utils/http.js';
import store from '../store';

uni.$http = $http;

$http.baseUrl = 'http://192.168.1.117:9009';

// 请求拦截
$http.beforeRequest = function(options) {
	const token = store.state.userInfo.token;
	options.header = {
		'Authorization': token,
	}
}

// 响应拦截
$http.afterRequest = function({
	data,
	statusCode
}) {
	// do something...
}